# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=py3-sarge
pkgver=0.1.7
pkgrel=1
pkgdesc="Subprocess Allegedly Rewards Good Encapsulation"
url="https://github.com/vsajip/sarge"
arch="noarch"
license="BSD-3-Clause"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/vsajip/sarge/archive/refs/tags/$pkgver/sarge-$pkgver.tar.gz"
builddir="$srcdir/sarge-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages testenv
	testenv/bin/python3 -m installer .dist/*.whl
	testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f2017fdab137e1aebfcd60a125ea7ff057158c6bf6a277d3084db73ed62a07cfd3464deba883284980c9f6ea3f56810effb551e8e8523ab750a086895ad0297a  sarge-0.1.7.tar.gz
"
